<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>爱贝儿医</title>
    <meta name="format-detection" content="telephone=no, address=no">
    <meta name="apple-mobile-web-app-capable" content="yes" /> <!-- apple devices fullscreen -->
    <meta name="apple-touch-fullscreen" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
    <meta name="keywords" content="微直达" />
    <meta name="description" content="微直达:直达天下，瞬息联通。" />
    <script src="../resource/js/jquery-1.11.1.min.js"></script>
    <script src="//res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>

    <!-- Bootstrap -->
    <link href="../resource/css/bootstrap.min.css" rel="stylesheet">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->


</head>
<body style="background-color: #EEE;">


<?php
require_once "jssdk.php";
$数据=pdo()->selectColumns('public_serv_accounts',array('AppSecret','app_id'),array('id'=>$_SESSION['vo用户数据']['公众号ID']));
$jssdk = new JSSDK($数据['app_id'], $数据['AppSecret']);
$signPackage = $jssdk->getSignPackage();

if(!$_SESSION['vo用户数据']['openID']) {
    $information = '请不要在非微信平台访问!';
}
if(!empty($_GET['qun_id'])){
    $sql1="select a.* from 会议表 a LEFT  JOIN 群详情 b on(a.id=b.父id) where b.id=".$_GET['qun_id'];

    $huiyi_res=pdo()->selectOne($sql1);
    $state=array('meet_id'=>$huiyi_res['id'],'群id'=>$_GET['qun_id']);

    $back=Tools::url('conference',$huiyi_res['下一步'],$state);
    $back="window.location.href='".$back."'";
}else {
    $back = 'history.back(-1)';
}


?>
<div class="">

        <div class="">
            <div role="alert">
                <h1 style="font-size: 150%; font-weight: normal; width: 100% ; text-align:center; margin-top:150px; overflow: hidden; ">请您扫描会场二维码进入线上讨论组</h1>
            </div>

            <div>
                <button type="button" style="width: 80%; height: 44px; line-height: 44px; margin-left: 10%; color: #FFF; background-color: #826EC3; border-radius: 4px; border:1px solid #826EC3; font-size: 110%; margin-top:44px; " id="scanQRCode">&nbsp;&nbsp;确定&nbsp;&nbsp;</button>
<!-- <?=$back?> -->
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    wx.config({
        debug: false,
        appId: '<?php echo $signPackage["appId"];?>',
        timestamp: <?php echo $signPackage["timestamp"];?>,
        nonceStr: '<?php echo $signPackage["nonceStr"];?>',
        signature: '<?php echo $signPackage["signature"];?>',
        jsApiList: [
            'scanQRCode'
        ]
    });
    function fun(aa){
       window.location.href=aa;
    }
    function closeWind(){

        if(typeof(WeixinJSBridge)=='undefined'){
            window.close();
        }else

            WeixinJSBridge.invoke('closeWindow',{},function(res){

                //alert(res.err_msg);
                return true;
            });
    }
    function returnBack(){

        window.history.back();
    }
   
        $("#scanQRCode").click(function(){
             wx.scanQRCode({   
                needResult: 0, // 默认为0，扫描结果由微信处理，1则直接返回扫描结果，
                scanType: ["qrCode","barCode"], // 可以指定扫二维码还是一维码，默认二者都有
                success: function (res) {
                    var result = res.resultStr; // 当needResult 为 1 时，扫码返回的结果
                }
            })
         })    
</script>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="../resource/js/jquery-1.11.1.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="../resource/js/bootstrap.min.js"></script>
</body>
</html>